<?php

class Reale_Model_News
{
	protected $_news_id;

	protected $_news_title;
	
	protected $_news_summary;
	
	protected $_news_body;
	
	protected $_mapper;
	/**
	 * @return the $_news_id
	 */
	public function getNews_id() {
		return $this->_news_id;
	}

	/**
	 * @return the $_news_title
	 */
	public function getNews_title() {
		return $this->_news_title;
	}

	/**
	 * @return the $_news_summary
	 */
	public function getNews_summary() {
		return $this->_news_summary;
	}

	/**
	 * @return the $_news_body
	 */
	public function getNews_body() {
		return $this->_news_body;
	}
	
	/**
	 * @return the $_mapper
	 */
	public function getMapper() {
		if (null === $this->_mapper) {
            $this->setMapper(new Reale_Model_NewsMapper());
        }
        return $this->_mapper;
	}

	/**
	 * @param field_type $_news_id
	 * @return Reale_Model_News
	 */
	public function setNews_id($_news_id) {
		$this->_news_id = $_news_id;
		return $this;
	}

	/**
	 * @param field_type $_news_title
	 * @return Reale_Model_News
	 */
	public function setNews_title($_news_title) {
		$this->_news_title = $_news_title;
		return $this;
	}

	/**
	 * @param field_type $_news_summary
	 * @return Reale_Model_News
	 */
	public function setNews_summary($_news_summary) {
		$this->_news_summary = $_news_summary;
		return $this;
	}

	/**
	 * @param field_type $_news_body
	 * @return Reale_Model_News
	 */
	public function setNews_body($_news_body) {
		$this->_news_body = $_news_body;
		return $this;
	}
	
	/**
	 * @param field_type Reale_Model_NewsMapper
	 * @return Reale_Model_News
	 */
	public function setMapper($_mapper) {
		$this->_mapper = $_mapper;
		return $this;
	}

	
	public function save(){
		return $this->getMapper()->save($this);
	}
	
	/**
	 * 
	 * Enter description here ...
	 * @param int $count 
	 * $count specifies the number of news which should be fetched 
	 * default vlaue is null which means fetch all. 
	 * return array|NULL 
	 */
	public function fetch($count=NULL){
		return $this->getMapper()->fetch($this,$count);
	}
}

